import zhipuai


zhipuai.api_key = "3ef8f4f7818d61993c49f594d14d768a.a0r4u7lpsYIuT2xE"


def getGeci(prompt):
    response = zhipuai.model_api.invoke(
        model="chatglm_lite",
        prompt=[{"role": "user", "content": prompt}],
        top_p=0.7,
        temperature=0.9,
    )

    return response['data']['choices'][0]['content']

promt = "写一首歌词"
geci = getGeci(promt)
print(geci)

